home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- #include "shared.fx"
-
- //------------------------------------------------------------------------------------------------------
- //- Static parameters
- //------------------------------------------------------------------------------------------------------
-
- //common things
- texture SourceTexture1; // param 0
- texture SourceTexture2; // param 1
- texture SourceTexture3; // param 2
- texture SourceTexture4; // param 3
-
- //glow things
-
- float4 GlowThreshold; // param 4
-
- //blur things
- float BlurStrength; // param 5
- float TextureWidth; // param 6
- float TextureHeight; // param 7
-
- //blend things
- float4 WeightSource1; // param 8
- float4 WeightSource2; // param 9
- float4 WeightSource3; // param 10
- float4 WeightSource4; // param 11
-
- //fade color
- float4 Color;
- float3 Time;
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- struct CVS_Base_Input
- {
- float4 Position : POSITION;
- float2 DiffuseUv : TEXCOORD0;
- };
-
- //------------------------------------------------------------------------------------------------------
-
- struct CVS_Base_Output
- {
- float4 Position : POSITION;
- float2 DiffuseUv : TEXCOORD0;
- };
-
- //------------------------------------------------------------------------------------------------------
- // Blended Vertex shader outputs
- //
- // the point is to duplicate uv in all channels (2 for a 2 tex blend, 3 for a 3 tex blend, 4 for a 4 tex blend...)
- //------------------------------------------------------------------------------------------------------
- struct CVS_Blend2_Output
- {
- float4 Position : POSITION;
- float2 DiffuseUv1 : TEXCOORD0;
- float2 DiffuseUv2 : TEXCOORD1;
- };
-
- struct CVS_Blend3_Output
- {
- float4 Position : POSITION;
- float2 DiffuseUv1 : TEXCOORD0;
- float2 DiffuseUv2 : TEXCOORD1;
- float2 DiffuseUv3 : TEXCOORD2;
- };
-
- struct CVS_Blend4_Output
- {
- float4 Position : POSITION;
- float2 DiffuseUv1 : TEXCOORD0;
- float2 DiffuseUv2 : TEXCOORD1;
- float2 DiffuseUv3 : TEXCOORD2;
- float2 DiffuseUv4 : TEXCOORD3;
- };
-
- //------------------------------------------------------------------------------------------------------
-
- struct CVS_Blur_Output
- {
- float4 Position : POSITION;
- float2 DiffuseN0 : TEXCOORD0;
- float2 DiffuseN1 : TEXCOORD1;
- float2 DiffuseN2 : TEXCOORD2;
- float2 DiffuseN3 : TEXCOORD3;
-
- };
-
- //------------------------------------------------------------------------------------------------------
- // VERTEX SHADERS DECLARATIONS
- //------------------------------------------------------------------------------------------------------
- CVS_Base_Output VSBase (const CVS_Base_Input input);
- CVS_Blend2_Output VSBlend2 (const CVS_Base_Input input);
- CVS_Blend3_Output VSBlend3 (const CVS_Base_Input input);
- CVS_Blend4_Output VSBlend4 (const CVS_Base_Input input);
- CVS_Blur_Output HorizontalBlurVS(const CVS_Base_Input input);
- CVS_Blur_Output VerticalBlurVS (const CVS_Base_Input input);
-
-
- //------------------------------------------------------------------------------------------------------
- // VERTEX SHADERS IMPLEMENTATIONS
- //------------------------------------------------------------------------------------------------------
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Base_Output VSBase (const CVS_Base_Input input)
- //
- // simple position + uv transfer (UV correction is applied though)
- //------------------------------------------------------------------------------------------------------
- CVS_Base_Output VSBase (const CVS_Base_Input input)
- {
- CVS_Base_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output
- output.DiffuseUv = input.DiffuseUv + (0.5f/TextureWidth, 0.5f/TextureHeight);
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Blend2_Output VSBlend2 (const CVS_Base_Input input)
- //
- // position tranfer
- // uv transfer and replication on 2 channels (UV correction is applied)
- //------------------------------------------------------------------------------------------------------
- CVS_Blend2_Output VSBlend2 (const CVS_Base_Input input)
- {
- CVS_Blend2_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output
- float2 vCorrectedUV = input.DiffuseUv + (0.5f/TextureWidth, 0.5f/TextureHeight);
- output.DiffuseUv1 = vCorrectedUV;
- output.DiffuseUv2 = vCorrectedUV;
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Blend3_Output VSBlend3 (const CVS_Base_Input input)
- //
- // position tranfer
- // uv transfer and replication on 3 channels (UV correction is applied)
- //------------------------------------------------------------------------------------------------------
- CVS_Blend3_Output VSBlend3 (const CVS_Base_Input input)
- {
- CVS_Blend3_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output
- float2 vCorrectedUV = input.DiffuseUv + (0.5f/TextureWidth, 0.5f/TextureHeight);
- output.DiffuseUv1 = vCorrectedUV;
- output.DiffuseUv2 = vCorrectedUV;
- output.DiffuseUv3 = vCorrectedUV;
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Blend4_Output VSBlend4 (const CVS_Base_Input input)
- //
- // position tranfer
- // uv transfer and replication on 4 channels (UV correction is applied)
- //------------------------------------------------------------------------------------------------------
- CVS_Blend4_Output VSBlend4 (const CVS_Base_Input input)
- {
- CVS_Blend4_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output
- float2 vCorrectedUV = input.DiffuseUv + (0.5f/TextureWidth, 0.5f/TextureHeight);
- output.DiffuseUv1 = vCorrectedUV;
- output.DiffuseUv2 = vCorrectedUV;
- output.DiffuseUv3 = vCorrectedUV;
- output.DiffuseUv4 = vCorrectedUV;
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Blur_Output HorizontalBlurVS (const CVS_Base_Input input)
- //
- // horizontal 4 sample uv computation and transfer -=0=-
- //------------------------------------------------------------------------------------------------------
- CVS_Blur_Output HorizontalBlurVS (const CVS_Base_Input input)
- {
- CVS_Blur_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output using neighbour sampling!!
- float OffsetU = BlurStrength/TextureWidth; // a whole BlurStrength * width_pixel of offset
- float2 DeltaUV = (0.5f/TextureWidth, 0.5f/TextureHeight); // screen grid align (half of a pixel in both directions
-
- DeltaUV.x -= OffsetU;
- output.DiffuseN0 = saturate(input.DiffuseUv + DeltaUV); // one pixel to the left
-
- DeltaUV.x -= OffsetU;
- output.DiffuseN1 = saturate(input.DiffuseUv + DeltaUV); // two pixels to the left
-
- DeltaUV.x += 3.0f*OffsetU;
- output.DiffuseN2 = saturate(input.DiffuseUv + DeltaUV); // one pixel to the right
-
- DeltaUV.x += OffsetU;
- output.DiffuseN3 = saturate(input.DiffuseUv + DeltaUV); // two pixels to the right
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // CVS_Blur_Output VerticalBlurVS (const CVS_Base_Input input)
- //
- // vertical 4 sample uv computation and transfer
- //------------------------------------------------------------------------------------------------------
- CVS_Blur_Output VerticalBlurVS (const CVS_Base_Input input)
- {
- CVS_Blur_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output using neighbour sampling!!
- float OffsetV = BlurStrength/TextureHeight; // a whole BlurStrength * height_pixel of offset (blur * (1.0f / TexHeight) )
- float2 DeltaUV = (0.5f/TextureWidth, 0.5f/TextureHeight); // screen grid align (half of a pixel in both directions
-
- DeltaUV.y -= OffsetV;
- output.DiffuseN0 = saturate(input.DiffuseUv + DeltaUV); // one pixel up
-
- DeltaUV.y -= OffsetV;
- output.DiffuseN1 = saturate(input.DiffuseUv + DeltaUV); // two pixels up
-
- DeltaUV.y += 3.0f*OffsetV;
- output.DiffuseN2 = saturate(input.DiffuseUv + DeltaUV); // one pixel down
-
- DeltaUV.y += OffsetV;
- output.DiffuseN3 = saturate(input.DiffuseUv + DeltaUV); // two pixels down
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // TECHNIQUES DEFINITIONS
- //------------------------------------------------------------------------------------------------------
- technique BaseRender
- <
- int Priority = 1;
- int TechniqueIndex = 0;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = NONE; //no mipmaps.
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBase();
-
- PixelShader =
- asm
- {
- ps_1_1
-
- tex t0 // source texture
-
- mov r0, t0 // simple output
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique Blended2Render
- <
- int Priority = 1;
- int TechniqueIndex = 1;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- Texture [1] = <SourceTexture2>;
- MinFilter[1] = LINEAR;
- MagFilter[1] = LINEAR;
- MipFilter[1] = POINT;
- AddressU [1] = CLAMP;
- AddressV [1] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBlend2();
-
- // c0: SourceTexture1 weight
- // c1: SourceTexture2 weight
- PixelShaderConstant[0] = <WeightSource1>;
- PixelShaderConstant[1] = <WeightSource2>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- tex t0
- tex t1
-
- mul r0, c0, t0
- mad_sat r0, c1, t1, r0 // weighted additive blend.
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique Blended3Render
- <
- int Priority = 1;
- int TechniqueIndex = 2;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- Texture [1] = <SourceTexture2>;
- MinFilter[1] = LINEAR;
- MagFilter[1] = LINEAR;
- MipFilter[1] = POINT;
- AddressU [1] = CLAMP;
- AddressV [1] = CLAMP;
-
- Texture [2] = <SourceTexture3>;
- MinFilter[2] = LINEAR;
- MagFilter[2] = LINEAR;
- MipFilter[2] = POINT;
- AddressU [2] = CLAMP;
- AddressV [2] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBlend3();
-
- // c0: SourceTexture1 weight
- // c1: SourceTexture2 weight
- // c2: SourceTexture3 weight
- PixelShaderConstant[0] = <WeightSource1>;
- PixelShaderConstant[1] = <WeightSource2>;
- PixelShaderConstant[2] = <WeightSource3>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- tex t0
- tex t1
- tex t2
-
- mul r0, c0, t0
- mad r0, c1, t1, r0
- mad_sat r0, c2, t2, r0
- };
- }
- }
-
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique Blended4Render
- <
- int Priority = 1;
- int TechniqueIndex = 3;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- Texture [1] = <SourceTexture2>;
- MinFilter[1] = LINEAR;
- MagFilter[1] = LINEAR;
- MipFilter[1] = POINT;
- AddressU [1] = CLAMP;
- AddressV [1] = CLAMP;
-
- Texture [2] = <SourceTexture3>;
- MinFilter[2] = LINEAR;
- MagFilter[2] = LINEAR;
- MipFilter[2] = POINT;
- AddressU [2] = CLAMP;
- AddressV [2] = CLAMP;
-
- Texture [3] = <SourceTexture4>;
- MinFilter[3] = LINEAR;
- MagFilter[3] = LINEAR;
- MipFilter[3] = POINT;
- AddressU [3] = CLAMP;
- AddressV [3] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBlend4();
-
- // c0: SourceTexture1 weight
- // c1: SourceTexture2 weight
- // c2: SourceTexture3 weight
- // c3: SourceTexture4 weight
- PixelShaderConstant[0] = <WeightSource1>;
- PixelShaderConstant[1] = <WeightSource2>;
- PixelShaderConstant[2] = <WeightSource3>;
- PixelShaderConstant[3] = <WeightSource4>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- tex t0
- tex t1
- tex t2
- tex t3
-
- mul r0, c0, t0
- mad r0, c1, t1, r0
- mad r0, c2, t2, r0
- mad_sat r0, c3, t3, r0
- };
- }
- }
-
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique HorizontalBlurSample4
- <
- int Priority = 1;
- int TechniqueIndex = 4;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- Texture [1] = <SourceTexture1>;
- MinFilter[1] = LINEAR;
- MagFilter[1] = LINEAR;
- MipFilter[1] = POINT;
- AddressU [1] = CLAMP;
- AddressV [1] = CLAMP;
-
- Texture [2] = <SourceTexture1>;
- MinFilter[2] = LINEAR;
- MagFilter[2] = LINEAR;
- MipFilter[2] = POINT;
- AddressU [2] = CLAMP;
- AddressV [2] = CLAMP;
-
- Texture [3] = <SourceTexture1>;
- MinFilter[3] = LINEAR;
- MagFilter[3] = LINEAR;
- MipFilter[3] = POINT;
- AddressU [3] = CLAMP;
- AddressV [3] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 HorizontalBlurVS();
-
- //PixelShaderConstant[1]=<BlurColor>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- def c0, 0.0f,0.0f,0.0f,1.0f
- def c1, 0.35f,0.35f,0.35f,0.35f //blur weights of inner samples which may be resulting in colored blur if not equals
- def c2, 0.15f,0.15f,0.15f,0.15f //blur weights of outer samples
-
- tex t0
- tex t1
- tex t2
- tex t3
-
- mul r0.rgb, t0, c1 + mov r0.a, c0.a
- mad r0.rgb, t1, c2, r0
- mad r0.rgb, t2, c1, r0
- mad r0.rgb, t3, c2, r0
- };
- }
- }
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique VerticalBlurSample4
- <
- int Priority = 1;
- int TechniqueIndex = 5;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- Texture [1] = <SourceTexture1>;
- MinFilter[1] = LINEAR;
- MagFilter[1] = LINEAR;
- MipFilter[1] = POINT;
- AddressU [1] = CLAMP;
- AddressV [1] = CLAMP;
-
- Texture [2] = <SourceTexture1>;
- MinFilter[2] = LINEAR;
- MagFilter[2] = LINEAR;
- MipFilter[2] = POINT;
- AddressU [2] = CLAMP;
- AddressV [2] = CLAMP;
-
- Texture [3] = <SourceTexture1>;
- MinFilter[3] = LINEAR;
- MagFilter[3] = LINEAR;
- MipFilter[3] = POINT;
- AddressU [3] = CLAMP;
- AddressV [3] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VerticalBlurVS();
-
- PixelShader =
- asm
- {
- ps.1.1
-
- def c0, 0.0f,0.0f,0.0f,1.0f
- def c1, 0.35f,0.35f,0.35f,0.35f //blur weights of inner samples which may be resulting in colored blur if not equals
- def c2, 0.15f,0.15f,0.15f,0.15f //blur weights of outer samples
-
- tex t0
- tex t1
- tex t2
- tex t3
-
- mul r0.rgb, t0, c1 + mov r0.a, c0.a
- mad r0.rgb, t1, c2, r0
- mad r0.rgb, t2, c1, r0
- mad r0.rgb, t3, c2, r0
- };
- }
- }
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- technique GlowMapBuild
- <
- int Priority = 1;
- int TechniqueIndex = 6;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBase();
-
- PixelShaderConstant[0]=<GlowThreshold>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- def c1, 0.30f,0.59f,0.11f,0.0f //constantes de luminance. pour conversion de la scene en Noir & Blanc
- def c2, 0.0f,0.0f,0.0f,0.0f // zero, what we take for the glowmap where it is not supposed to glow
- def c3, 0.5f,0.5f,0.5f,0.5f // to bias the cnd level
-
- tex t0
-
- //je veux en fonction des couleurs de la texture masquer ou pas pour le glow
- //allons zo!! il suffit de convertir en N&B!!!
-
- dp3 r0.rgba, t0, c1 //conversion en N&B, j ecris aussi et surtout dans l alpha.
-
- //bon on va essayer de prendre en compte le glow parametre user.
- sub r0.a, r0, c0 // (rendu noir et blanc - seuil glow)
- add_sat r0.a, r0, c3 // le seuil du cnd est a 0.5 en hardware, pour couper ou on veut, on biaise notre seuil
- cnd r0, r0.a, t0, c2 // et masquage avec l alpha seuil, on construit la glow map en prenant le diffuse ou zero selon le seuil.
- };
- }
- }
- //---------------------------------------------------------------------------------
- //---------------------------------------------------------------------------------
- //---------------------------------------------------------------------------------
-
- technique PostProcessConvertToLuminance
- <
- int Priority = 1;
- int TechniqueIndex = 7;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT; //no mipmaps.
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBase();
-
- PixelShader =
- asm
- {
- ps_1_1
-
- def c1, 0.30f,0.59f,0.11f,0.0f //constantes de luminance.
-
- tex t0 // source texture
-
- dp3_sat r0.rgb, t0, c1 + mov r0.a, t0.a
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- technique FadeToColor
- <
- int Priority = 1;
- int TechniqueIndex = 8;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture [0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = NONE;
- AddressU [0] = CLAMP;
- AddressV [0] = CLAMP;
-
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
-
- VertexShader = compile vs_1_1 VSBase();
-
- PixelShaderConstant[0] = <Color>;
- PixelShaderConstant[1] = <Time>;
-
- PixelShader =
- asm
- {
- ps.1.1
-
- //def c1, 1.0f, 1.0f, 1.0f, 1.0f
-
- tex t0
-
- lrp r0, c1, c0, t0 // r0 = Time * FadeColor + (1-Time) * texture <= full tex when time = 0;
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- // ...T'N'L TECHINQUES...TODO TODO TODO TODO...
- //------------------------------------------------------------------------------------------------------
-
- technique techTnL_0
- <
- int Priority = 1;
- int TechniqueIndex = 0;
- int DeviceType = TNL_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- WorldTransform[0] = <WorldCameraProjection>;
-
- Texture[0] = <SourceTexture1>;
-
- ColorArg1[0] = TEXTURE;
- ColorOp[0] = SELECTARG1;
- AlphaArg1[0] = TEXTURE;
- AlphaOp[0] = SELECTARG1;
-
- ColorOp[1] = DISABLE;
- AlphaOp[1] = DISABLE;
-
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = POINT;
-
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
-
- CullMode = CW;
- ZEnable = true;
- ZFunc = LESSEQUAL;
- ZWriteEnable = true;
- AlphaBlendEnable = false;
- AlphaTestEnable = true;
- AlphaRef = 192;
- AlphaFunc = GREATEREQUAL;
- FogEnable = false;
-
- VertexShader = NULL;
- PixelShader = NULL;
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-